<script setup lang="ts"></script>

<template>
  <main class="main-wrap" v-hl>
    <div class="dev-wrap">
      <div class="box-wrap">
        <div class="btn-box flex-hw-ss">
          <a class="btn-0"><span>Swipe</span></a>
          <a class="btn-1"><span>Diagonal Swipe</span></a>
          <a class="btn-1-2"><span>Double Swipe</span></a>
          <a class="btn-2"><span>Diagonal Close</span></a>
          <a class="btn-3"><span>Zoning In</span></a>
          <a class="btn-4"><span>4 Corners</span><i></i></a>
          <a class="btn-5"><span>Slice</span></a>
          <a class="btn-7"><span>Alternate</span><i></i></a>
          <a class="btn-8"><span>Smoosh</span></a>
          <a class="btn-9"><span>Vertical Overlap</span><i></i></a>
          <a class="btn-10"><span>Horizontal Overlap</span><i></i></a>
          <a class="btn-11"><span>Collision</span></a>
          <a class="btn-6"><span>Position Aware</span><i></i></a>
          <a class="btn wave left">Wave left</a>
          <a class="btn half-stroke left">Half left</a>
          <a class="btn stroke left">Stroke left</a>
          <a class="btn bubble left">Bubble left</a>
          <a class="btn wave right">Wave right</a>
          <a class="btn half-stroke right">Half right</a>
          <a class="btn stroke right">Stroke right</a>
        </div>
      </div>
      <div class="box-wrap">
        <div class="btn-box flex-h-cc">
          <a class="flex-h-cc" style="--color: #ec3e27">
            <div class="icon flex-h-cc">
              <span style="--i: 1"></span>
              <span style="--i: 2"></span>
              <span style="--i: 3"></span>
              <i class="iconfont icon-weibo"></i>
            </div>
            <div class="text">Weibo</div>
          </a>
          <a class="flex-h-cc" style="--color: #fd79a8">
            <div class="icon flex-h-cc">
              <span style="--i: 1"></span>
              <span style="--i: 2"></span>
              <span style="--i: 3"></span>
              <i class="iconfont icon-google"></i>
            </div>
            <div class="text">Google</div>
          </a>
          <a class="flex-h-cc" style="--color: #0984e3">
            <div class="icon flex-h-cc">
              <span style="--i: 1"></span>
              <span style="--i: 2"></span>
              <span style="--i: 3"></span>
              <i class="iconfont icon-weixin"></i>
            </div>
            <div class="text">Wexin</div>
          </a>
          <a class="flex-h-cc" style="--color: #00b894">
            <div class="icon flex-h-cc">
              <span style="--i: 1"></span>
              <span style="--i: 2"></span>
              <span style="--i: 3"></span>
              <i class="iconfont icon-tt"></i>
            </div>
            <div class="text">Twitter</div>
          </a>
        </div>
      </div>
    </div>
  </main>
</template>

<style scoped lang="scss">
.main-wrap {
  @include size(100%, 100%);
  overflow-y: auto;
  background: #f1f9f9;
  .dev-wrap {
    padding: 24px 24px 60px;
    overflow: hidden;
    .box-wrap {
      @include size(1060px, auto);
      margin: 0 auto;
      .btn-box {
        @include size(100%, auto);
        [class^='btn-'] {
          @include size(250px, 80px);
          @include font(16px, 80px, #000);
          position: relative;
          display: block;
          overflow: hidden;
          text-align: center;
          margin: 12px auto;
          text-decoration: none;
          text-transform: uppercase;
          border: 1px solid currentColor;
          &::before,
          &::after,
          i::before,
          i::after {
            transition: all 0.5s ease-in-out;
          }
          i {
            display: inline-block;
            @include size(100%, 100%);
            position: absolute;
            top: 0;
            left: 0;
          }
          span {
            position: relative;
            z-index: 10;
          }
        }
        .btn-0 {
          color: #5eb0bf;
          &:before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: #27616c;
            transform: translateX(-100%);
          }
          &:hover {
            color: #d0e8ec;
            z-index: 2;
            &:before {
              transform: translateX(0);
            }
          }
        }
        .btn-1 {
          color: #735636;
          &:before {
            content: '';
            position: absolute;
            top: 0;
            right: -50px;
            bottom: 0;
            left: 0;
            border-right: 50px solid transparent;
            border-bottom: 80px solid #36220b;
            transform: translateX(-100%);
          }
          &:hover {
            color: #d6cdc4;
            &:before {
              transform: translateX(0);
            }
          }
        }
        .btn-1-2 {
          color: #9c7a72;
          &:before,
          &:after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            border-bottom: 80px solid #533b35;
          }
          &:before {
            right: -50px;
            border-right: 50px solid transparent;
            -webkit-transform: translateX(-100%);
            transform: translateX(-100%);
          }
          &:after {
            left: -50px;
            border-left: 50px solid transparent;
            -webkit-transform: translateX(100%);
            transform: translateX(100%);
          }
          &:hover {
            color: #e2d8d6;
            &:before {
              -webkit-transform: translateX(-40%);
              transform: translateX(-40%);
            }
            &:after {
              -webkit-transform: translateX(40%);
              transform: translateX(40%);
            }
          }
        }

        .btn-2 {
          color: #8fa030;
          &:before,
          &:after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
          }
          &:before {
            right: -50px;
            border-right: 50px solid transparent;
            border-bottom: 80px solid #4a5607;
            transform: translateX(-100%);
          }
          &:after {
            left: -50px;
            border-left: 50px solid transparent;
            border-top: 80px solid #4a5607;
            transform: translateX(100%);
          }
          &:hover {
            color: #dee3c2;
            &:before {
              transform: translateX(-49.5%);
            }
            &:after {
              transform: translateX(49.5%);
            }
          }
        }
        .btn-3 {
          &:before,
          &:after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            border-top: 40px solid #765365;
            border-bottom: 40px solid #765365;
          }
          &:before {
            border-right: 40px solid transparent;
            transform: translateX(-100%);
          }
          &:after {
            border-left: 40px solid transparent;
            transform: translateX(100%);
          }
          &:hover {
            color: #f1e2ea;
            &:before {
              transform: translateX(-30%);
            }
            &:after {
              transform: translateX(30%);
            }
          }
        }
        .btn-4 {
          color: #4d5983;
          &:before,
          & i:before,
          &:after,
          & i:after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: #1c2441;
          }
          &:before {
            transform: translate(-100%, -100%);
          }
          &:after {
            transform: translate(-100%, 100%);
          }
          & i:before {
            transform: translate(100%, -100%);
          }
          & i:after {
            transform: translate(100%, 100%);
          }
          &:hover {
            color: #cbcedb;
            &:before {
              transform: translate(-50%, -50%);
            }
            &:after {
              transform: translate(-50%, 50%);
            }
            & i:before {
              transform: translate(50%, -50%);
            }
            & i:after {
              transform: translate(50%, 50%);
            }
          }
        }
        .btn-5 {
          color: #8fce9c;
          &:before,
          &:after {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border: 0 solid;
            -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
          }
          &:after {
            content: '';
            width: 0;
            height: 0;
            transform: rotate(360deg);
            border-style: solid;
            border-width: 0 0 0 0;
            border-color: transparent #4a7653 transparent transparent;
            position: absolute;
            top: 0;
            right: 0;
          }
          &:before {
            content: '';
            width: 0;
            height: 0;
            transform: rotate(360deg);
            border-style: solid;
            border-width: 0 0 0 0;
            border-color: transparent transparent transparent #4a7653;
            position: absolute;
            bottom: 0;
            left: 0;
          }
          &:hover {
            color: #def1e2;
            &:before,
            &:after {
              border-width: 80px 262.5px;
            }
          }
        }
        .btn-6 {
          color: #49bca5;
          i {
            position: absolute;
            display: block;
            width: 0;
            height: 0;
            border-radius: 50%;
            background-color: #196a59;
            transition:
              width 0.4s ease-in-out,
              height 0.4s ease-in-out;
            transform: translate(-50%, -50%);
            z-index: -1;
          }
          &:hover {
            color: #caebe5;
            i {
              width: 225%;
              height: 562.5px;
            }
          }
        }
        .btn-7 {
          color: #6e637b;
          &:before,
          &:after,
          i:before,
          i:after {
            content: '';
            position: absolute;
            top: 0;
            width: 25.25%;
            height: 0;
            background-color: #322b3c;
          }
          &:before {
            left: 0;
          }
          &:after {
            left: 50%;
          }
          i:before,
          i:after {
            top: auto;
            bottom: 0;
          }
          i:before {
            left: 25%;
          }
          i:after {
            left: 75%;
          }
          &:hover {
            color: #d4d1d8;
            &::before,
            &:after,
            i:before,
            i:after {
              height: 80px;
            }
          }
        }
        .btn-8 {
          color: #3e5bb3;
          &:before,
          &:after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: #112564;
          }
          &:before {
            transform: translateY(-100%);
          }
          &:after {
            transform: translateY(100%);
          }
          &:hover {
            color: #c6cfe9;
            &:before {
              transform: translateY(-50%);
            }
            &:after {
              transform: translateY(50%);
            }
          }
        }
        .btn-9 {
          color: #846f2e;
          &:before,
          &:after,
          i:before,
          i:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 0;
            background-color: rgba(66, 52, 5, 0.25);
            transition: all 0.4s ease-in-out;
          }
          &:after,
          i:before {
            top: auto;
            bottom: 0;
          }
          i:before,
          i:after {
            transition-delay: 0.4s;
          }
          &:hover {
            color: #dbd5c2;
            :before,
            :after,
            i:before,
            i:after {
              height: 80px;
            }
          }
        }
        .btn-10 {
          color: #6a7b35;
          &:before,
          &:after,
          i:before,
          i:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 80px;
            background-color: rgba(48, 60, 10, 0.25);
            -webkit-transition: 0.4s;
            transition: 0.4s;
          }
          &:after,
          i:before {
            left: auto;
            right: 0;
          }
          i:before,
          i:after {
            transition-delay: 0.4s;
          }
          &:hover {
            color: #d3d8c4;
            :before,
            :after,
            i:before,
            i:after {
              width: 250px;
            }
          }
        }
        .btn-11 {
          position: relative;
          color: #c18bcd;
          &:before,
          &:after {
            position: absolute;
            top: 50%;
            content: '';
            width: 20px;
            height: 20px;
            background-color: #b676c4;
            border-radius: 50%;
          }
          &:before {
            left: -20px;
            transform: translate(-50%, -50%);
          }
          &:after {
            right: -20px;
            transform: translate(50%, -50%);
          }
          &:hover {
            color: #edddf0;
            &:before {
              animation: criss-cross-left 0.8s both;
              animation-direction: alternate;
            }
            &:after {
              animation: criss-cross-right 0.8s both;
              animation-direction: alternate;
            }
          }
        }
      }
      .btn-box {
        .btn {
          @include size(250px, 80px);
          @include font(16px, 80px, #fff);
          display: block;
          margin: 12px auto;
          position: relative;
          overflow: hidden;
          text-align: center;
          cursor: pointer;
          text-transform: uppercase;
          &:nth-child(n) {
            background-color: #2ecc71;
          }
          &:nth-of-type(2n) {
            background-color: #3498db;
          }
          &:nth-of-type(3n) {
            background-color: #e74c3c;
          }
          &:nth-of-type(4n) {
            background-color: #1abc9c;
          }
          &.left:after {
            left: 0;
          }
          &.right:after {
            right: 0;
          }
          &.wave {
            &:after {
              content: '';
              display: block;
              position: absolute;
              background: #fff;
              @include size(200%, 200%);
              top: -5%;
              border-radius: 50px;
              margin-left: -30%;
              opacity: 0;
              transition: all 0.75s ease-in-out;
            }
            &.right {
              &:after {
                content: '';
                background: #fff;
                display: block;
                position: absolute;
                @include size(200%, 200%);
                top: -5%;
                border-radius: 50px;
                margin-right: -30%;
                opacity: 0;
                transition: all 0.75s ease-in-out;
              }
            }
            &:active:after {
              width: 0px;
              opacity: 1;
              transition: 0s;
            }
          }
          &.stroke {
            &:after {
              content: '';
              background: #fff;
              display: block;
              position: absolute;
              @include size(200%, 200%);
              top: 0;
              opacity: 0;
              transition: all 0.75s ease-in-out;
            }
            &:active:after {
              width: 0px;
              opacity: 1;
              transition: 0s;
            }
          }
          &.half-stroke {
            &:after {
              content: '';
              background: #fff;
              display: block;
              position: absolute;
              @include size(100%, 100%);
              top: 0;
              opacity: 0;
              transition: all 0.75s ease-in-out;
            }
            &:active:after {
              width: 0px;
              opacity: 1;
              transition: 0s;
            }
          }
          &.bubble {
            &:after {
              content: '';
              background: #fff;
              position: absolute;
              @include size(200px, 200px);
              left: 0;
              right: 0;
              top: 0;
              bottom: 0;
              opacity: 0;
              margin: auto;
              border-radius: 50%;
              transform: scale(1);
              transition: all 0.75s ease-in-out;
            }
            &:active:after {
              transform: scale(0);
              opacity: 1;
              transition: 0s;
            }
          }
        }
      }
      .btn-box {
        a {
          @include size(250px, 120px);
          margin: 12px auto;
          text-align: center;
          position: relative;
          text-decoration: none;
          .icon {
            @include size(80px, 80px);
            position: absolute;
            color: var(--color);
            transition: all 0.3s;
            &::after {
              @include size(80px, 80px);
              position: absolute;
              content: '';
              box-sizing: border-box;
              border-radius: 10px;
              border: 2px solid var(--color);
            }
            i {
              font-size: 48px;
            }
            span {
              @include size(80px, 80px);
              display: block;
              position: absolute;
              box-sizing: border-box;
              border-radius: 10px;
              border: 2px solid var(--color);
              transform: translateX(calc(var(--i) * -8px)) translateY(calc(var(--i) * 8px));
              opacity: 0;
              box-shadow: -1px 1px 3px var(--color);
              transition: all 0.3s;
            }
          }
          &:hover .icon {
            transform: rotate(-30deg) skew(20deg);
            &::after {
              box-shadow: -1px 1px 3px var(--color);
            }
            span {
              opacity: calc((4 - var(--i)) * 0.25);
            }
          }
          .text {
            position: absolute;
            bottom: 30px;
            font-size: 24px;
            color: var(--color);
            opacity: 0;
            transition: all 0.3s;
          }
          &:hover .text {
            opacity: 1;
            bottom: -60px;
          }
        }
      }
    }
  }
}
@-webkit-keyframes criss-cross-left {
  0% {
    left: -20px;
  }
  50% {
    left: 50%;
    width: 20px;
    height: 20px;
  }
  100% {
    left: 50%;
    width: 375px;
    height: 375px;
  }
}

@keyframes criss-cross-left {
  0% {
    left: -20px;
  }
  50% {
    left: 50%;
    width: 20px;
    height: 20px;
  }
  100% {
    left: 50%;
    width: 375px;
    height: 375px;
  }
}
@-webkit-keyframes criss-cross-right {
  0% {
    right: -20px;
  }
  50% {
    right: 50%;
    width: 20px;
    height: 20px;
  }
  100% {
    right: 50%;
    width: 375px;
    height: 375px;
  }
}
@keyframes criss-cross-right {
  0% {
    right: -20px;
  }
  50% {
    right: 50%;
    width: 20px;
    height: 20px;
  }
  100% {
    right: 50%;
    width: 375px;
    height: 375px;
  }
}
</style>
